#ifndef _PARTICLE_HOLDER_H_
#define _PARTICLE_HOLDER_H_
#include "IFpsParticleSystemSceneNode.h"

class ParticleHolder
{
public:	
	//bgbejan needs save(?)
	ParticleHolder(stringw effectType);
	~ParticleHolder();

	/*void SaveData(CWriteFile* stream);
	void LoadData(CReadFile* stream);


	void Restart();

	void SetPosition(Vector3D position);
	void SetDirection(Vector3D direction);

	bool IsVisible() {return m_isVisible;};
	void SetVisible(bool isVisible);
	void StopEmitter();

	bool IsFinished();
	bool IsActive();

	void SetManualEmitControl(bool isManual);
	void EmitParticlesNow(int nbParticles);

	ISceneNode *m_attachedNode;
	ISceneNode *GetSceneNode() {return m_attachedNode;};


	Vector3D m_position;
	Vector3D m_direction;
	bool     m_isVisible;
	bool     m_isManual;
	bool     m_Stopped;*/

	array<IFpsParticleSystemSceneNode*> m_particleSystems;
	void AddChild(IFpsParticleSystemSceneNode* particleSystem);
	bool IsVisible() {return m_isVisible;};
	void SetVisible(bool isVisible);
	void StopEmitter();
	bool IsActive();
	bool IsFinished();
	inline void SetSelfManagement(bool b){m_selfManagement = b;}
	inline bool IsSelfManagement(){return m_selfManagement;}
	void render();
	void update(float time);
	void Restart();

	bool     m_isVisible;
	bool     m_isManual;
	bool     m_Stopped;

	bool	m_selfManagement;
	
	void SetPosition(float x, float y,bool bIsNew = false);
};

#endif